package com.np.adapterdemo1;

import android.app.Activity;
import android.os.Bundle;
import android.widget.ArrayAdapter;
import android.widget.ListView;

public class ArrayAdapterSecondActivity extends Activity {

    private ListView mListView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        String[] strArray = {"1", "2", "3", "4", "5"};

        mListView = new ListView(this);
        mListView.setAdapter(new ArrayAdapter<>(this, R.layout.activity_array_adapter, strArray));
        setContentView(mListView);
    }
}